package com.yingxin.yx.framework.commons.enums;

public enum MaterialType {

    RZ("RZ", "热轧卷"),
    SX("SX", "酸洗卷"),
    ZY("ZY", "轧硬卷"),
    DX("DX", "镀锌卷"),
    CT("CT", "彩涂卷"),
    XD("XD", "锌锭"),
    XLTZD("XLTZD", "锌铝调整锭"),
    XTTZD("XTTZD", "锌锑调整锭"),
    FL("FL","废料");

    private String type;

    private String typeName;


    MaterialType(String type, String typeName) {
        this.type = type;
        this.typeName = typeName;

    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }


    public static MaterialType getEnum(String type) {
        if (type == null) {
            return null;
        }
        for (MaterialType i : MaterialType.values()) {
            if (i.getType().equals(type)) {
                return i;
            }
        }
        return null;
    }

}